const Geetest = require('geetest');
module.exports = class extends saas.Service {
    constructor() {
        super();
        this.captcha = new Geetest({
            geetest_id: '0ac1207f5e0bf9dea47316f40c9fb4e2',
            geetest_key: '1edf6f63aed115999dc56031bfe0b7b4',
        });
    }

    async register() {
        return await this.captcha.register();
    }

    async validate(challenge: string, validate: string, seccode: string) {
        return await this.captcha.validate({
            challenge: challenge,
            validate: validate,
            seccode: seccode
        })
    }
}